 //1.公用样式
 require('../../assets/css/index.js')
 //当前页面样式
 require('./riding.less');
    //2.公用js
let dom=require('../../utils/dom.js');
let http=require('../../utils/http.js');
let uti=require('../../utils/utils.js');
dom.ready(function(){
    dom.ft('exercise');
    tops('riding')
    function tops(pitch) {
        dom.getById('header').innerHTML = `
            <div id="exer" class="option ${pitch == 'exer' ? 'pitch' : ''}">跑步</div>
            <div id="riding" class="option ${pitch == 'riding' ? 'pitch' : ''}">骑行</div>
            <div id="cour" class="option ${pitch == 'cour' ? 'pitch' : ''}">训练课程</div>
        `
        topat()
    }
    function topat(){
        let he=document.querySelector('header');
          he.addEventListener('click',function(e){
            if(e.target.id==='exer'){
              location.href='./exercise.html';
            }
            if(e.target.id==='riding'){
              location.href='./riding.html';
            }
            if(e.target.id==='cour'){
              location.href='./cour.html';
            }
          })
          }

})